Skip to content

Instantly share code, notes, and snippets.

@GGPrompts
GGPrompts / wipe.md
Last active February 24, 2026 23:49
Claude Code /wipe command - Generate handoff, clear context, and auto-continue in fresh session
description
Generate handoff, clear context, and auto-continue in fresh session

Generate a concise handoff summary, then automatically clear context and resume with the handoff in a fresh session.

Step 1: Generate Handoff Summary

Use this format (skip sections that don't apply):

@privatenumber
privatenumber / typescript-v5-to-v6.md
Created February 24, 2026 13:21
TypeScript 5.x to 6.0 Migration Guide

TypeScript 5.x to 6.0 Migration Guide

TypeScript 6.0 is a transition release bridging 5.9 and the forthcoming 7.0 (a native Go port). Most changes are new defaults and deprecations preparing for 7.0. Here is what you need to do:

Most projects need these tsconfig changes:

{
    "compilerOptions": {
        "types": ["node"],           // @types are no longer auto-discovered (see §1.6)

Adjusting the Grub Bootloader for a HiDPI Screen

The text size on Grub, when running on a computer with a HiDPI screen (e.g., 2880x1800 at 13 inch), will often appear too small. Lowering Grub's resolution is one solution. However, it will make Grub's interface pixelated. A better way is to enlarge the font size itself and not mess with the resolution.

We can start by deciding what font we want to use for Grub's interface. I recommend using a typeface that is specifically built for the absence of anti-aliasing, such as Unifont.

Changing the font size of Grub means replacing the binary .pf2 font file that is compatible with Grub (regular .ttf files can't be read by Grub). This is because the font size is hardcoded to the binary. To create that .pf2 file out of the Unifont typeface, we can run the following in the command line:

sudo grub-mkfont --no-hinting -s 32 -o /boot/grub/fonts/unifont.pf2 /usr/share/fonts/Unifont/Unifont.ttf
# frozen_string_literal: true
# Helper for Git worktree-aware behavior
module GitWorktree
PROJECT_ROOT = File.expand_path("..", __dir__)
def self.name
return @_name if defined?(@_name)
git_dir = `git rev-parse --git-dir 2>/dev/null`.strip
return @_name = nil if git_dir.empty? || git_dir.exclude?("/worktrees/")
//gcc float_code.c -o float_code
//gcc float_code.c -o float_code -ffast-math
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <float.h>
void print_float_type(float f) {
switch (fpclassify(f)) {
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active February 24, 2026 23:37
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@modellking
modellking / image-resize.sh
Created February 11, 2026 00:14
Nautilus image resize
#!/usr/bin/bash
# Coded by: Vladislav Grigoryev <vg[dot]aetera[at]gmail[dot]com>
# Edited by: Simon "modellking"
# License: GNU General Public License (GPL) version 3+
# Description: Resize images with ImageMagick from Nautilus
# Requires: bash coreutils ImageMagick nautilus zenity
# Build suggested resolutions: same aspect ratio with a common dimension (e.g. 1080)
# or integer multiple/divisor of current size. Outputs pipe-separated combo values;
@promto-c
promto-c / sqlite_schema_to_dbml.py
Created May 29, 2024 06:32
This Python script converts the schema of an SQLite database to DBML format. It exports the table definitions and foreign key relationships, allowing for easy visualization of the database structure using tools like dbdiagram.io.
"""
Copyright (C) 2024 promto-c
Permission Notice:
- You are free to use, copy, modify, and distribute this software for any purpose.
- No restrictions are imposed on the use of this software.
- You do not need to give credit or include this notice in your work.
- Use at your own risk.
- This software is provided "AS IS" without any warranty, either expressed or implied.
"""
@karpathy
karpathy / microgpt.py
Last active February 24, 2026 23:36
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
$ sudo apt update
$ sudo apt install nmap